# A rocket is started from the surface of the earth. Calculating the height as function of its mass and fuel consumption. # Approximation of acceleration with Taylor series # Equation of motion # r'' = (alpha / m0)*v0 + (alpha/m0)²*v0*t - gamma * ME / r² # alpha: fuel consumption, e.g. 2000t in 2,5 min = 13,333*10^3 kg/s # m0: initial mass of rocket, e.g. Saturn V: 2900 t = 2,9*10^6 kg # v0: the velocity of the exhaust of the rocket: 3,180*10^3 m/s # gamma: gravitational constant: 6,6743E-11 m³/(kg*s²) # ME: mass of earth: 5,97E+24 kg # include idivide include CompoundFunctions.LACE coefficient.1(+1) -> alpha/m0*v0 coefficient.2(+1) -> (alpha/m0)^2*v0 coefficient.3 -> scale coefficient.4(-1) -> -RE coefficient.5(+1) -> 10*gamma*ME # generate t-ramp iintegrate (-1) -> t # calculating altitude iintegrate (alpha/m0*v0, (alpha/m0)^2*v0*t, -gamma*ME/r^2) -> -v # input is a ### 3. Term fehlen noch ### cmultiply (scale, -v) -> -v.scaled iintegrate (-v) -> r IC: -RE # calculating acceleration multiply (r,r) -> r^2 idivide (10*gamma*ME, r^2) -> -10*gamma*ME/r^2 cmultiply ((alpha/m0)^2*v0, t) -> (alpha/m0)^2*v0*t # inverting velocity for display invert (-v.scaled) -> v.scaled # subtracting the radius of earth in order to get altitude above ground for display isum (-RE, r) -> -z invert (-z) -> z output (t) -> out.x output (v) -> out.y output (z) -> out.z